﻿//===================================================================================
// Copyright (c) Ryan Garrett.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================

using System;
using System.Collections.Generic;
using Caffeine.Core.Test.TestModel;

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForAutoRegisterPropertyTesting : ModelBase
    {
        [ModelBackingProperty(typeof(EnumForTesting), "EnumProperty", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<EnumForTesting> _EnumProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the EnumProperty property
        /// </summary>
        public ModelProperty<EnumForTesting> EnumProperty
        {
            get { return _EnumProperty; }
        }

        [ModelBackingProperty(typeof(Nullable<EnumForTesting>), "NullableEnumForTesting", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<Nullable<EnumForTesting>> _NullableEnumForTesting = null; //Will be set by reflection.

        /// <summary>
        /// Gets the NullableEnumForTesting property
        /// </summary>
        public ModelProperty<Nullable<EnumForTesting>> NullableEnumForTesting
        {
            get { return _NullableEnumForTesting; }
        }

        [ModelBackingProperty(typeof(String), "StringProperty", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<String> _StringProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the StringProperty property
        /// </summary>
        public ModelProperty<String> StringProperty
        {
            get { return _StringProperty; }
        }

        [ModelBackingProperty(typeof(Object), "ObjectProperty", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<Object> _ObjectProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ObjectProperty property
        /// </summary>
        public ModelProperty<Object> ObjectProperty
        {
            get { return _ObjectProperty; }
        }

        [ModelBackingProperty(typeof(Int32), "Int32Property", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<Int32> _Int32Property = null; //Will be set by reflection.

        /// <summary>
        /// Gets the Int32Property property
        /// </summary>
        public ModelProperty<Int32> Int32Property
        {
            get { return _Int32Property; }
        }

        [ModelBackingProperty(typeof(Nullable<Char>), "NullableCharProperty", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<Nullable<Char>> _NullableCharProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the NullableCharProperty property
        /// </summary>
        public ModelProperty<Nullable<Char>> NullableCharProperty
        {
            get { return _NullableCharProperty; }
        }

        [ModelBackingProperty(typeof(ModelForAutoRegisterPropertyTesting), "ChildProperty", ModelBase.StandardBehaviors, false, false)]
        protected readonly ModelProperty<ModelForAutoRegisterPropertyTesting> _ChildProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ChildProperty property
        /// </summary>
        public ModelProperty<ModelForAutoRegisterPropertyTesting> ChildProperty
        {
            get { return _ChildProperty; }
        }

        [ModelBackingProperty(typeof(ModelForAutoRegisterPropertyTesting), "ChildrenProperty", ModelBase.StandardBehaviors, true, false)]
        protected readonly ModelCollection<ModelForAutoRegisterPropertyTesting> _ChildrenProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ChildrenProperty property
        /// </summary>
        public ModelCollection<ModelForAutoRegisterPropertyTesting> ChildrenProperty
        {
            get { return _ChildrenProperty; }
        }

        #region EnumWrapped Property

        [ModelBackingProperty(typeof(EnumForTesting), "EnumWrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<EnumForTesting> _EnumWrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the EnumWrapped backing property
        /// </summary>
        public ModelProperty<EnumForTesting> EnumWrappedProperty
        {
            get { return _EnumWrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the EnumWrappedProperty.Value value. This property supports change notification. If the EnumWrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [EnumWrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public EnumForTesting EnumWrapped
        {
            get { return EnumWrappedProperty.Value; }
            set { EnumWrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the EnumWrappedProperty.CommittedValue value. This property supports change notification. If the EnumWrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [EnumWrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public EnumForTesting EnumWrappedCommittedValue
        {
            get { return EnumWrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the EnumWrappedProperty.IsDirty flag. This property supports change notification. If the EnumWrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [EnumWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public Boolean EnumWrappedIsDirty
        {
            get { return EnumWrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the EnumWrappedProperty.IsInvalid flag. This property supports change notification. If the EnumWrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [EnumWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public Boolean EnumWrappedIsInvalid
        {
            get { return EnumWrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the EnumWrappedProperty.IsDefault flag. This property supports change notification. If the EnumWrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [EnumWrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public Boolean EnumWrappedIsDefault
        {
            get { return EnumWrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the EnumWrappedProperty.ValidationErrors enumeration. This property supports change notification. If the EnumWrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [EnumWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> EnumWrappedValidationErrors
        {
            get { return EnumWrappedProperty.ValidationErrors; }
        }

        #endregion

        #region NullableEnumWrapped Property

        [ModelBackingProperty(typeof(Nullable<EnumForTesting>), "NullableEnumWrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Nullable<EnumForTesting>> _NullableEnumWrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the NullableEnumWrapped backing property
        /// </summary>
        public ModelProperty<Nullable<EnumForTesting>> NullableEnumWrappedProperty
        {
            get { return _NullableEnumWrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the NullableEnumWrappedProperty.Value value. This property supports change notification. If the NullableEnumWrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableEnumWrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Nullable<EnumForTesting> NullableEnumWrapped
        {
            get { return NullableEnumWrappedProperty.Value; }
            set { NullableEnumWrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the NullableEnumWrappedProperty.CommittedValue value. This property supports change notification. If the NullableEnumWrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableEnumWrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Nullable<EnumForTesting> NullableEnumWrappedCommittedValue
        {
            get { return NullableEnumWrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the NullableEnumWrappedProperty.IsDirty flag. This property supports change notification. If the NullableEnumWrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableEnumWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public Boolean NullableEnumWrappedIsDirty
        {
            get { return NullableEnumWrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the NullableEnumWrappedProperty.IsInvalid flag. This property supports change notification. If the NullableEnumWrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableEnumWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public Boolean NullableEnumWrappedIsInvalid
        {
            get { return NullableEnumWrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the NullableEnumWrappedProperty.IsDefault flag. This property supports change notification. If the NullableEnumWrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableEnumWrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public Boolean NullableEnumWrappedIsDefault
        {
            get { return NullableEnumWrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the NullableEnumWrappedProperty.ValidationErrors enumeration. This property supports change notification. If the NullableEnumWrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableEnumWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public IEnumerable<ValidationError> NullableEnumWrappedValidationErrors
        {
            get { return NullableEnumWrappedProperty.ValidationErrors; }
        }

        #endregion

        #region StringWrapped Property

        [ModelBackingProperty(typeof(String), "StringWrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<String> _StringWrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the StringWrapped backing property
        /// </summary>
        public ModelProperty<String> StringWrappedProperty
        {
            get { return _StringWrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the StringWrappedProperty.Value value. This property supports change notification. If the StringWrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [StringWrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public String StringWrapped
        {
            get { return StringWrappedProperty.Value; }
            set { StringWrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the StringWrappedProperty.CommittedValue value. This property supports change notification. If the StringWrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [StringWrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public String StringWrappedCommittedValue
        {
            get { return StringWrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the StringWrappedProperty.IsDirty flag. This property supports change notification. If the StringWrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [StringWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool StringWrappedIsDirty
        {
            get { return StringWrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the StringWrappedProperty.IsInvalid flag. This property supports change notification. If the StringWrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [StringWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool StringWrappedIsInvalid
        {
            get { return StringWrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the StringWrappedProperty.IsDefault flag. This property supports change notification. If the StringWrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [StringWrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool StringWrappedIsDefault
        {
            get { return StringWrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the StringWrappedProperty.ValidationErrors enumeration. This property supports change notification. If the StringWrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [StringWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> StringWrappedValidationErrors
        {
            get { return StringWrappedProperty.ValidationErrors; }
        }

        #endregion

        #region ObjectWrapped Property

        [ModelBackingProperty(typeof(Object), "ObjectWrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Object> _ObjectWrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ObjectWrapped backing property
        /// </summary>
        public ModelProperty<Object> ObjectWrappedProperty
        {
            get { return _ObjectWrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the ObjectWrappedProperty.Value value. This property supports change notification. If the ObjectWrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectWrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Object ObjectWrapped
        {
            get { return ObjectWrappedProperty.Value; }
            set { ObjectWrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the ObjectWrappedProperty.CommittedValue value. This property supports change notification. If the ObjectWrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectWrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Object ObjectWrappedCommittedValue
        {
            get { return ObjectWrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the ObjectWrappedProperty.IsDirty flag. This property supports change notification. If the ObjectWrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public Boolean ObjectWrappedIsDirty
        {
            get { return ObjectWrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the ObjectWrappedProperty.IsInvalid flag. This property supports change notification. If the ObjectWrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public Boolean ObjectWrappedIsInvalid
        {
            get { return ObjectWrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the ObjectWrappedProperty.IsDefault flag. This property supports change notification. If the ObjectWrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectWrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public Boolean ObjectWrappedIsDefault
        {
            get { return ObjectWrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the ObjectWrappedProperty.ValidationErrors enumeration. This property supports change notification. If the ObjectWrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public IEnumerable<ValidationError> ObjectWrappedValidationErrors
        {
            get { return ObjectWrappedProperty.ValidationErrors; }
        }

        #endregion

        #region Int32Wrapped Property

        [ModelBackingProperty(typeof(Int32), "Int32WrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Int32> _Int32WrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the Int32Wrapped backing property
        /// </summary>
        public ModelProperty<Int32> Int32WrappedProperty
        {
            get { return _Int32WrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the Int32WrappedProperty.Value value. This property supports change notification. If the Int32WrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32WrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Int32 Int32Wrapped
        {
            get { return Int32WrappedProperty.Value; }
            set { Int32WrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the Int32WrappedProperty.CommittedValue value. This property supports change notification. If the Int32WrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Wrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Int32 Int32WrappedCommittedValue
        {
            get { return Int32WrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the Int32WrappedProperty.IsDirty flag. This property supports change notification. If the Int32WrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Wrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool Int32WrappedIsDirty
        {
            get { return Int32WrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the Int32WrappedProperty.IsInvalid flag. This property supports change notification. If the Int32WrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Wrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool Int32WrappedIsInvalid
        {
            get { return Int32WrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the Int32WrappedProperty.IsDefault flag. This property supports change notification. If the Int32WrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Wrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool Int32WrappedIsDefault
        {
            get { return Int32WrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the Int32WrappedProperty.ValidationErrors enumeration. This property supports change notification. If the Int32WrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [Int32Wrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> Int32WrappedValidationErrors
        {
            get { return Int32WrappedProperty.ValidationErrors; }
        }

        #endregion

        #region NullableCharWrapped Property

        [ModelBackingProperty(typeof(Nullable<Char>), "NullableCharWrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Nullable<Char>> _NullableCharWrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the NullableCharWrapped backing property
        /// </summary>
        public ModelProperty<Nullable<Char>> NullableCharWrappedProperty
        {
            get { return _NullableCharWrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the NullableCharWrappedProperty.Value value. This property supports change notification. If the NullableCharWrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharWrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Nullable<Char> NullableCharWrapped
        {
            get { return NullableCharWrappedProperty.Value; }
            set { NullableCharWrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the NullableCharWrappedProperty.CommittedValue value. This property supports change notification. If the NullableCharWrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharWrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Nullable<Char> NullableCharWrappedCommittedValue
        {
            get { return NullableCharWrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the NullableCharWrappedProperty.IsDirty flag. This property supports change notification. If the NullableCharWrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public Boolean NullableCharWrappedIsDirty
        {
            get { return NullableCharWrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the NullableCharWrappedProperty.IsInvalid flag. This property supports change notification. If the NullableCharWrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public Boolean NullableCharWrappedIsInvalid
        {
            get { return NullableCharWrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the NullableCharWrappedProperty.IsDefault flag. This property supports change notification. If the NullableCharWrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharWrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public Boolean NullableCharWrappedIsDefault
        {
            get { return NullableCharWrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the NullableCharWrappedProperty.ValidationErrors enumeration. This property supports change notification. If the NullableCharWrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [NullableCharWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public IEnumerable<ValidationError> NullableCharWrappedValidationErrors
        {
            get { return NullableCharWrappedProperty.ValidationErrors; }
        }

        #endregion

        #region ChildWrapped Property

        [ModelBackingProperty(typeof(ModelForAutoRegisterPropertyTesting), "ChildWrappedProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<ModelForAutoRegisterPropertyTesting> _ChildWrappedProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ChildWrapped backing property
        /// </summary>
        public ModelProperty<ModelForAutoRegisterPropertyTesting> ChildWrappedProperty
        {
            get { return _ChildWrappedProperty; }
        }

        /// <summary>
        /// Gets or sets the ChildWrappedProperty.Value value. This property supports change notification. If the ChildWrappedProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildWrappedProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public ModelForAutoRegisterPropertyTesting ChildWrapped
        {
            get { return ChildWrappedProperty.Value; }
            set { ChildWrappedProperty.Value = value; }
        }

        /// <summary>
        /// Gets the ChildWrappedProperty.CommittedValue value. This property supports change notification. If the ChildWrappedProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildWrapped + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public ModelForAutoRegisterPropertyTesting ChildWrappedCommittedValue
        {
            get { return ChildWrappedProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the ChildWrappedProperty.IsDirty flag. This property supports change notification. If the ChildWrappedProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public Boolean ChildWrappedIsDirty
        {
            get { return ChildWrappedProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the ChildWrappedProperty.IsInvalid flag. This property supports change notification. If the ChildWrappedProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public Boolean ChildWrappedIsInvalid
        {
            get { return ChildWrappedProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the ChildWrappedProperty.IsDefault flag. This property supports change notification. If the ChildWrappedProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildWrapped + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public Boolean ChildWrappedIsDefault
        {
            get { return ChildWrappedProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the ChildWrappedProperty.ValidationErrors enumeration. This property supports change notification. If the ChildWrappedProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public IEnumerable<ValidationError> ChildWrappedValidationErrors
        {
            get { return ChildWrappedProperty.ValidationErrors; }
        }

        #endregion

        #region ChildrenWrapped Property

        [ModelBackingProperty(typeof(ModelForAutoRegisterPropertyTesting), "ChildrenWrapped", ModelBase.StandardBehaviors, true, true)]
        protected readonly ModelCollection<ModelForAutoRegisterPropertyTesting> _ChildrenWrapped = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ChildrenWrapped property
        /// </summary>
        public ModelCollection<ModelForAutoRegisterPropertyTesting> ChildrenWrapped
        {
            get { return _ChildrenWrapped; }
        }

        /// <summary>
        /// Gets the ChildrenWrapped.IsDirty flag. This property supports change notification. If the ChildrenWrapped.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildrenWrapped + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool ChildrenWrappedIsDirty
        {
            get { return ChildrenWrapped.IsDirty; }
        }

        /// <summary>
        /// Gets the ChildrenWrapped.IsInvalid flag. This property supports change notification. If the ChildrenWrapped.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildrenWrapped + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool ChildrenWrappedIsInvalid
        {
            get { return ChildrenWrapped.IsInvalid; }
        }

        /// <summary>
        /// Gets the ChildrenWrapped.ValidationErrors enumeration. This property supports change notification. If the ChildrenWrapped.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [ChildrenWrapped + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> ChildrenWrappedValidationErrors
        {
            get { return ChildrenWrapped.ValidationErrors; }
        }

        #endregion

        private void ValidateEnumProperty
        (
            ModelProperty<EnumForTesting> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateNullableEnumForTesting
        (
            ModelProperty<Nullable<EnumForTesting>> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateStringProperty
        (
            ModelProperty<String> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateObjectProperty
        (
            ModelProperty<Object> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateInt32Property
        (
            ModelProperty<Int32> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateNullableCharProperty
        (
            ModelProperty<Nullable<Char>> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateChildProperty
        (
            ModelProperty<ModelForAutoRegisterPropertyTesting> property,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        private void ValidateChildrenProperty
        (
            ModelCollection<ModelForAutoRegisterPropertyTesting> collection,
            ref IEnumerable<ValidationError> validationErrors,
            ref Boolean isValid
        )
        {
            isValid = false;
            List<ValidationError> errors = new List<ValidationError>();
            validationErrors = errors;
            errors.Add(new ValidationError() { ErrorCode = 0, ErrorDescription = "The Error Description" });
        }

        protected override void OnInitialized()
        {
            base.OnInitialized();

            EnumProperty.ValidationMethod = ValidateEnumProperty;
            NullableEnumForTesting.ValidationMethod = ValidateNullableEnumForTesting;
            StringProperty.ValidationMethod = ValidateStringProperty;
            ObjectProperty.ValidationMethod = ValidateObjectProperty;
            Int32Property.ValidationMethod = ValidateInt32Property;
            NullableCharProperty.ValidationMethod = ValidateNullableCharProperty;
            ChildProperty.ValidationMethod = ValidateChildProperty;
            ChildrenProperty.ValidationMethod = ValidateChildrenProperty;

            EnumWrappedProperty.ValidationMethod = ValidateEnumProperty;
            NullableEnumWrappedProperty.ValidationMethod = ValidateNullableEnumForTesting;
            StringWrappedProperty.ValidationMethod = ValidateStringProperty;
            ObjectWrappedProperty.ValidationMethod = ValidateObjectProperty;
            Int32WrappedProperty.ValidationMethod = ValidateInt32Property;
            NullableCharWrappedProperty.ValidationMethod = ValidateNullableCharProperty;
            ChildWrappedProperty.ValidationMethod = ValidateChildProperty;
            ChildrenWrapped.ValidationMethod = ValidateChildrenProperty;
        }
    }
}
